<?php
/**
 * 加入我们
 */
namespace app\common\model;

use think\Model;

class Joinus extends Model
{
    protected $name = 'joinus';

    /**
     * 添加加入我们
     * @param $mid  用户ID
     * @param $name 姓名
     * @param $mailbox  邮箱
     * @param $tel  联系电话
     * @param string $corporate_name    公司名称
     * @param string $country   国家
     * @param string $province  省
     * @param string $city  地区
     * @param string $corporate_address 详细地址
     * @param string $introduction  简介
     * @param string $photo 照片
     */
    public static function add($mid,$name,$mailbox,$tel,$corporate_name,$corporate_tel,$corporate_logo,$corporate_address = '',$introduction = '',$photo = ''){
        $data = [
            'mid'   =>  $mid,
            'name'  =>  $name,
            'mailbox'=> $mailbox,
            'tel'   =>  $tel,
            'corporate_name'    =>  $corporate_name,
            'corporate_tel'   =>  $corporate_tel,
            'corporate_logo'  =>  $corporate_logo,
            'corporate_address' =>  $corporate_address,
            'introduction'  =>  $introduction,
            'photo' =>  $photo,
            'add_time'  =>  date('Y-m-d H:i:s',time())
        ];
        $id = self::insertGetId($data);
        return $id;
    }

}